<%@page import="svn_photo.photoVo"%>
<%@page import="java.util.Vector"%>
<%@page import="svn_photo.Photo"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>photomain.html</title>
</head>
<style>
@import url(http://fonts.googleapis.com/earlyaccess/nanumgothic.css);

#main{
	position: relative;
	margin: 0px auto;
	width:1000px;
}
#Gbtn{
	height:30px;
	padding-top:15px;
	padding-bottom:0px;
	width:200px;
	float: right;
	text-align: right;
	
}
#btn{
	display: inline-block;
}
#p_title {
	font-family: 'Nanum Gothic', sans-serif;
	position: relative;
	width: 600px;
	height: 40px;
	color: #545454;
	text-align: right;
	font-weight: bold;
	font-size: 33px;
	margin-top: 50px;
	
  	
}
#sub_title{
	font-family: 'Nanum Gothic', sans-serif;
	width:99%;
	height:38px;
	font-size: 28px;
	font-weight: bold;
	padding: 5px;
	background-color:#0fce84;	
}

#gi,#class,#gigan{
	font-family: 'Nanum Gothic', sans-serif;
	display: inline-block;
}

#Gimg{
	width:220px;
	display: inline-block;
	position:relative;
	padding-top:5px;
	padding-left:20px;
	padding-bottom:20px;
	margin-top: 5px;
}

#HGimg{
	font-family: 'Nanum Gothic', sans-serif;
	/*border:1px solid #000000;*/
	/* background-color: #0fce84; */
	background-color: #EFFFF9;
}

#gigan{
	font-family: 'Nanum Gothic', sans-serif;
	float:right;
	width:400px;
	font-size:18px;	
	color:#ffffff;
}

#gi{
	font-family: 'Nanum Gothic', sans-serif;
	float:left;
	width:110px;
	font-size:28px;
	color:#ffffff;
	font-weight: none;
}

#class{
	font-family: 'Nanum Gothic', sans-serif;
	float:left;
	width:200px;
	font-size:28px;
	color:#555555;
	font-weight: none;


}


</style>
<script src='photo_sc.js'></script>
</head>


<body>
<div id = 'main'>


	<jsp:useBean id="vo" class="svn_photo.photoVo" />
	<jsp:setProperty property="*" name="vo" />
	<%
		Photo photo= new Photo();
		photo.setVo(vo);
		Vector<photoVo> v = photo.compare();
	%>



				<div id='Gbtn'>
					<% //아이디 정보 가져오는 것(로그인 확인하는 것)
						String sessionID=(String)session.getAttribute("mid");
						if(sessionID==null){
						sessionID="NotUser";
					}%>
					
 				<%if(sessionID.equals("admin")){ %>		
						<div id='btn'>
						<input type='button' value='코드목록' id='codeList'>	
						<input type='button' value='글작성' id='btInsert' >
						</div>
					<%}else if(sessionID.equals("NotUser")){%>
						<div id='btn'></div>
					<%}else{ %> 
						<div id='btn'>
						<input type='button' value='글작성' id='btInsert' >	
						</div>
 					<%} %>
				  
				  </div>

<div id='holl'>
		
		
		<div id='p_title'>포 트 폴 리 오</div>	
		<hr size=2 align='center' width="98%" noshade></hr>

				<%	for(int i=0; i<v.size();i++){ 
					photoVo pv = v.get(i); %>
					
					
		<div id='sub_title'>
			<div id='gi'>  <%=pv.getGisu()%> 기 </div>
			<div id='class'>[ <%=pv.getClassname()%> ]</div>
			<div id='gigan'>[ 수 료 기 간: <%=pv.getSdate()%> ~ <%=pv.getEdate()%> ]</div>
		</div>
		
		
		<div id='HGimg'>
					<% Vector<photoVo> vv = photo.list(pv.getSerial());
						for(int j=0; j<vv.size();j++){
						photoVo pv2= vv.get(j); 
					%>

		<div id='Gimg' align="left">
					
			<div class="ih-item square effect13 left_to_right">
					<a href="index.jsp?inc_contents=photoView.jsp&serial=<%=pv2.getSerial()%>">
							<div class="img">
								<% if(pv2.getFilename() == null || pv2.getFilename() == ""){ %>
									<input type="image" src="./photoUpload/nofile.jpg" alt="img">
								<%}else{ %>
									<input type="image" src="./photoUpload/<%=pv2.getFilename()%>" alt="img">
								<%} %>
							</div>
							<div class="info">
								<h3><%=pv2.getProject()%></h3>
								<h3><%=pv2.getSummary()%></h3>
							</div>
					</a>
			</div>
					
		</div>
		
			<%}}photo.endConn();%>
		</div>
</div>


</div>



	<script>
		init();
		code2();
	</script>
<div id='ft' style="width: 100%; height: 20px; display: inline-block;" align="center"></div>
</body>
</html>
